<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>发现异常!</title>
<STYLE>
body{ COLOR: #333; background:#f8f8f8; font-size: 12px;padding:0px;margin:0px;}
a{text-decoration:none;color:#3071BF}
.wrap{ margin:20px auto; padding:10px; max-width:800px;background:#fff;border:1px solid #DDD;border-radius:10px;overflow:hidden;}
h1{text-align:center;}
.message{font-size:1.2em; line-height:22px; padding:15px 15px;background:#f2dede;color:#a94442;border:solid 1px #ebccd1;border-radius:5px;}
.trace{}
table{width:100%;border-spacing:0;border-collapse:collapse;}
th{padding:10px;text-align:left;background:#f5f5f5;}
td{padding:10px;border-top:1px solid #ddd;}
@media only screen and (max-width: 767px) {
	.wrap{margin:20px;}
}
</STYLE>
<?php
//设置错误url时进行跳转
if($errorUrl){    
print <<<EOT
<script language="javascript">
	if(self!=top){
	  parent.location.href="{$errorUrl}";
	} else {
	 window.location.href="{$errorUrl}";
	}
</script>
EOT;
 exit; 
} 
?>
</head>
<body>
<?php if($debug){ ?>
<div class="wrap">
	<h1>发现异常</h1>
	<div class="message">
	出错信息：<?php echo $message; ?><br>
	出错文件：<?php echo $file; ?><br>
	错误行：<?php echo $line; ?><br>
          <!-- 错误编号：<?php echo $code; ?>-->
	</div>		
   <h1>Trace信息</h1>
   <div class="trace"><?php echo $trace; ?></div>	
</div>
<?php }?>
</body>
</html>